import React, { useState, useEffect } from 'react'
import CountWithStep from '../components/countWithStep'
import Reducer01 from '../components/reducer01'
import Reducer02 from '../components/reducer02'

const UseEffectPractice = () => {
    const [step,setStep] = useState(1)
    return (
        <div>
            <h2>useEffect</h2>
            <hr/>
            <CountWithStep/>
            <Reducer01/>
            <Reducer02 step={step}/>
            <input value={step} onChange={e=>setStep(Number(e.target.value))}/>
        </div>
    );
}

export default UseEffectPractice;
